<template>
  <div>
    <van-field label="用户名" v-model="from.username" />
    <van-field label="密码" v-model="from.password" />
    <van-button @click="admin">登录</van-button>
  </div>
</template>

<script>
export default {
name: "denglu",
  data(){
  return{
    from:{}
  }
  },
  methods:{
    admin(){
      this.myaxios('http://127.0.0.1:5000/admin', 'post', this.from).then(res=>{
        console.log(res.data)
        this.$router.push('custom_list')
      })
    }
  }
}
</script>

<style scoped>

</style>